﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category1
{
  public class MT112 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagChoiceDefinition U0008;
    private static SwiftTagDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagChoiceDefinition U0015;
    private static SwiftTagDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagDefinition U0019;
    private static SwiftTagSubItemDefinition U001A;
    private static SwiftTagSubItemDefinition U001B;
    private static SwiftTagDefinition U001C;
    private static SwiftTagSubItemDefinition U001D;
    private static SwiftTagSubItemDefinition U001E;
    private static SwiftTagDefinition U001F;
    private static SwiftTagSubItemDefinition U007F;
    private static SwiftTagSubItemDefinition U0080;
    private static SwiftTagDefinition U0081;

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U0002);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Cheque Number")]
    public Tag21 ChequeNumber_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U0004);
      }
    }

    [Description("Cheque Number")]
    public Tag21 Tag21_ChequeNumber
    {
      get
      {
        return this.ChequeNumber_21;
      }
    }

    [Description("Date Of Issue")]
    public Tag30 DateOfIssue_30
    {
      get
      {
        return new Tag30((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U0006);
      }
    }

    [Description("Date Of Issue")]
    public Tag30 Tag30_DateOfIssue
    {
      get
      {
        return this.DateOfIssue_30;
      }
    }

    [Description("Amount")]
    public Tag32A Amount_32A
    {
      get
      {
        return new Tag32A((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U000E);
      }
    }

    [Description("Amount")]
    public Tag32A Tag32A_Amount
    {
      get
      {
        return this.Amount_32A;
      }
    }

    [Description("Amount")]
    public Tag32B Amount_32B
    {
      get
      {
        return new Tag32B((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U0012);
      }
    }

    [Description("Amount")]
    public Tag32B Tag32B_Amount
    {
      get
      {
        return this.Amount_32B;
      }
    }

    [Description("Drawer Bank")]
    public Tag52A DrawerBank_52A
    {
      get
      {
        return new Tag52A((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U0016);
      }
    }

    [Description("Drawer Bank")]
    public Tag52A Tag52A_DrawerBank
    {
      get
      {
        return this.DrawerBank_52A;
      }
    }

    [Description("Drawer Bank")]
    public Tag52B DrawerBank_52B
    {
      get
      {
        return new Tag52B((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U0019);
      }
    }

    [Description("Drawer Bank")]
    public Tag52B Tag52B_DrawerBank
    {
      get
      {
        return this.DrawerBank_52B;
      }
    }

    [Description("Drawer Bank")]
    public Tag52D DrawerBank_52D
    {
      get
      {
        return new Tag52D((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U001C);
      }
    }

    [Description("Drawer Bank")]
    public Tag52D Tag52D_DrawerBank
    {
      get
      {
        return this.DrawerBank_52D;
      }
    }

    [Description("Payee")]
    public MT112.Tag59 Payee_59
    {
      get
      {
        return new MT112.Tag59((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U001F);
      }
    }

    [Description("Payee")]
    public MT112.Tag59 Tag59_Payee
    {
      get
      {
        return this.Payee_59;
      }
    }

    [Description("Answers")]
    public Tag76 Answers_76
    {
      get
      {
        return new Tag76((SwiftElement) this, 0, (SwiftDefinitionElement) MT112.U0081);
      }
    }

    [Description("Answers")]
    public Tag76 Tag76_Answers
    {
      get
      {
        return this.Answers_76;
      }
    }

    public MT112()
      : base(true)
    {
    }

    public MT112(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT112.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT112.MessageDefinition = new SwiftMessageDefinition("MT112", "Status of a request for stop payment of cheque");
      MT112.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT112.U0002.TagName = ":20:";
      MT112.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT112.U0002.Elements.Add((SwiftDefinitionElement) MT112.U0003);
      MT112.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT112.U0002);
      MT112.U0004 = new SwiftTagDefinition("ChequeNumber_21", "Cheque Number");
      MT112.U0004.TagName = ":21:";
      MT112.U0005 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT112.U0004.Elements.Add((SwiftDefinitionElement) MT112.U0005);
      MT112.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT112.U0004);
      MT112.U0006 = new SwiftTagDefinition("DateOfIssue_30", "Date Of Issue");
      MT112.U0006.TagName = ":30:";
      MT112.U0007 = new SwiftTagSubItemDefinition("Date", "Date");
      MT112.U0006.Elements.Add((SwiftDefinitionElement) MT112.U0007);
      MT112.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT112.U0006);
      MT112.U0008 = new SwiftTagChoiceDefinition("Choice", "");
      MT112.U0008.Multiple = true;
      MT112.U000E = new SwiftTagDefinition("Amount_32A", "Amount");
      MT112.U000E.TagName = ":32A:";
      MT112.U000F = new SwiftTagSubItemDefinition("Date", "Date");
      MT112.U000E.Elements.Add((SwiftDefinitionElement) MT112.U000F);
      MT112.U0010 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT112.U000E.Elements.Add((SwiftDefinitionElement) MT112.U0010);
      MT112.U0011 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT112.U000E.Elements.Add((SwiftDefinitionElement) MT112.U0011);
      MT112.U0008.Elements.Add((SwiftDefinitionElement) MT112.U000E);
      MT112.U0012 = new SwiftTagDefinition("Amount_32B", "Amount");
      MT112.U0012.TagName = ":32B:";
      MT112.U0013 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT112.U0012.Elements.Add((SwiftDefinitionElement) MT112.U0013);
      MT112.U0014 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT112.U0012.Elements.Add((SwiftDefinitionElement) MT112.U0014);
      MT112.U0008.Elements.Add((SwiftDefinitionElement) MT112.U0012);
      MT112.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT112.U0008);
      MT112.U0015 = new SwiftTagChoiceDefinition("Choice", "");
      MT112.U0015.Mandatory = false;
      MT112.U0015.Multiple = true;
      MT112.U0016 = new SwiftTagDefinition("DrawerBank_52A", "Drawer Bank");
      MT112.U0016.TagName = ":52A:";
      MT112.U0017 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT112.U0017.Mandatory = false;
      MT112.U0016.Elements.Add((SwiftDefinitionElement) MT112.U0017);
      MT112.U0018 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT112.U0016.Elements.Add((SwiftDefinitionElement) MT112.U0018);
      MT112.U0015.Elements.Add((SwiftDefinitionElement) MT112.U0016);
      MT112.U0019 = new SwiftTagDefinition("DrawerBank_52B", "Drawer Bank");
      MT112.U0019.TagName = ":52B:";
      MT112.U001A = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT112.U001A.Mandatory = false;
      MT112.U0019.Elements.Add((SwiftDefinitionElement) MT112.U001A);
      MT112.U001B = new SwiftTagSubItemDefinition("Location", "Location");
      MT112.U001B.Mandatory = false;
      MT112.U0019.Elements.Add((SwiftDefinitionElement) MT112.U001B);
      MT112.U0015.Elements.Add((SwiftDefinitionElement) MT112.U0019);
      MT112.U001C = new SwiftTagDefinition("DrawerBank_52D", "Drawer Bank");
      MT112.U001C.TagName = ":52D:";
      MT112.U001D = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT112.U001D.Mandatory = false;
      MT112.U001C.Elements.Add((SwiftDefinitionElement) MT112.U001D);
      MT112.U001E = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT112.U001C.Elements.Add((SwiftDefinitionElement) MT112.U001E);
      MT112.U0015.Elements.Add((SwiftDefinitionElement) MT112.U001C);
      MT112.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT112.U0015);
      MT112.U001F = new SwiftTagDefinition("Payee_59", "Payee");
      MT112.U001F.TagName = ":59:";
      MT112.U001F.Mandatory = false;
      MT112.U007F = new SwiftTagSubItemDefinition("Account", "Account");
      MT112.U007F.Mandatory = false;
      MT112.U001F.Elements.Add((SwiftDefinitionElement) MT112.U007F);
      MT112.U0080 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT112.U001F.Elements.Add((SwiftDefinitionElement) MT112.U0080);
      MT112.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT112.U001F);
      MT112.U0081 = new SwiftTagDefinition("Answers_76", "Answers");
      MT112.U0081.TagName = ":76:";
      MT112.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT112.U0081);
    }

    public class Tag59 : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("59", value);
        }
      }

      internal Tag59(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }
  }
}
